﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Data;
using System.Windows.Documents;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Imaging;
using System.Windows.Shapes;

namespace 多选按钮弹窗
{
    /// <summary>
    /// MyDialog.xaml 的交互逻辑
    /// </summary>
    public partial class MyDialog : Window
    {
        //可空的bool类型true:表示OK,null:表示重试,false:表示取消
        public bool? Choose { get; set; }

        public MyDialog()
        {
            InitializeComponent();
        }

        //ok按钮点击事件
        private void btnOk_Click(object sender, RoutedEventArgs e)
        {
            this.Choose = true;
            this.Close();
        }

        //重试按钮的点击事件
        private void btnTry_Click(object sender, RoutedEventArgs e)
        {
            this.Choose = null;
            this.Close();
        }

        //取消的点击事件
        private void btnCancel_Click(object sender, RoutedEventArgs e)
        {
            this.Choose = false;
            this.Close();
        }
    }
}
